package com.lq.ecoldchain.ui.mine.recommand

import android.databinding.DataBindingUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.lq.ecoldchain.R
import com.lq.ecoldchain.databinding.RecommendItemBinding
import com.lq.ecoldchain.entity.RecommendEntity

/*
*2019/1/3 0003  16:22
*function by lq
*/
class RecommendAdapter(list:List<RecommendEntity>):BaseQuickAdapter<RecommendEntity,BaseViewHolder>(R.layout.recommend_item,list){
    override fun convert(helper: BaseViewHolder?, item: RecommendEntity?) {
        val binding = DataBindingUtil.bind<RecommendItemBinding>(helper!!.itemView)
        binding!!.entity = item
        binding.executePendingBindings()
    }
}